package com.tpp.threat_perception_platform.dao;

import com.tpp.threat_perception_platform.param.MyParam;
import com.tpp.threat_perception_platform.pojo.HostLog;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
* @author yokui
* @description 针对表【host_log】的数据库操作Mapper
* @createDate 2025-06-19 10:07:35
* @Entity com.tpp.threat_perception_platform.pojo.HostLog
*/
public interface HostLogMapper {

    int deleteByPrimaryKey(Long id);

    int insert(HostLog record);

    int insertSelective(HostLog record);

    HostLog selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(HostLog record);

    int updateByPrimaryKey(HostLog record);

    int checkDuplicate(String macAddress, Date timestamp);

    List<HostLog> findAll(@Param("param")MyParam param);

    int selectCount();

    int countFailedLoginsInTimeRange(@Param("username") String username, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    List<HostLog> findAllLoginLog(@Param("param")MyParam param);

    List<HostLog> findAllAccountLog(@Param("param")MyParam param);
}
